/**
 *  @file Reader.h
 */
#ifndef _READER_H_
#define _READER_H_

#include "../common/BaseObject.h"
#include "../collections/ArrayT.h"

namespace cppflib
{

namespace io
{

/**
 *  Base interface for reading data in a character-wise manner
 */
class _DLLAPI Reader : public BaseObject
{
protected:
   Reader() { }

public:
   virtual ~Reader() { }

   virtual void Close() = 0;
   virtual int Read(collections::ArrayWChar &buffer) = 0;
   virtual int Read(collections::ArrayWChar &buffer, int offset, int count) = 0;
   virtual int Read() = 0;
   virtual i64_t Skip(i64_t charCount) = 0;
   virtual sz_t CanReadNoBlocking() { return 0; }
   
};

} // end of namespace io

} // end of namespace cppflib

#endif
